#ifndef WREN_FUNCTION_EXTENSION_HPP
#define WREN_FUNCTION_EXTENSION_HPP

#include <string_view>
#include "scripting/scripting_api.h"
#include "wren_base.hpp"

struct WrenFunctionExtensionPrivate;
class WrenFunctionExtension final : public IFunctionalScript, WrenScriptBase
{
public:
    WrenFunctionExtension(std::string title, const std::string &script_path);
    ~WrenFunctionExtension();
    void execute() override;
    static IScript* create(std::string title, std::string_view code, const std::string &script_path);

private:
    bool compile(const std::string_view& code) const;
};

#endif /* WREN_FUNCTION_EXTENSION_HPP */
